//
// Created by Administrator on 2022/3/13.
//

#include "ts_sched.h"

TsSchedContainer* TS_SCHED_STACK_Push(TsSchedStack* stack) {
    return &(stack->stack[stack->depth++]);
}

void TS_SCHED_STACK_Pop(TsSchedStack* stack) {
    stack->depth--;
}

TsSchedContainer* TS_SCHED_STACK_GetTop(TsSchedStack* stack) {
    return &(stack->stack[stack->depth - 1]);
}

TsBool TS_SCHED_STACK_IsTop(TsSchedContainer* container, TsSchedStack* stack) {
    return &(stack->stack[stack->depth - 1]) == container;
}